<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>

</body>
<script>
  function getSum() {
    console.log(arguments);
    var sum = 0;
    for(var i = 0; i < arguments.length; i++){
       sum += arguments[i];
    }
    console.log(sum);
  }

  getSum(1, 2, 3, 4)
</script>
</html>